package com.xoa.service.AI.Impl;

import com.xoa.dao.AI.AISettingMapper;
import com.xoa.dao.WFE.WFEFlowRunMapper;
import com.xoa.model.AI.AISetting;
import com.xoa.model.workflow.FlowRun;
import com.xoa.service.AI.AIService;
import com.xoa.util.AjaxJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class AIServiceImpl implements AIService {

    @Autowired
    AISettingMapper aiSettingMapper;

    @Autowired
    WFEFlowRunMapper wfeFlowRunMapper;


    /**
     * 请假
     */
    private static int LEAVE_APPLY = 140;
    /**
     * 外出
     */
    private static int LEAVE_OUT = 143;

    @Override
    public AjaxJson newApply(String applyType,String type, String time, String startTime, String endTime, String message){
        AjaxJson ajaxJson = new AjaxJson();
        switch (applyType){
            case "qj":

        }
return null;


    }

   public AISetting selectByPrimaryKey(Integer uid){
        return aiSettingMapper.selectByPrimaryKey(uid);
    }

    public int updateByPrimaryKeySelective(AISetting record){
        return aiSettingMapper.updateByPrimaryKeySelective(record);
    }

    public int insertSelective(AISetting record){
        return aiSettingMapper.insertSelective(record);
    }

    public AjaxJson getRecentWorkFlow(Map<String,Object> map){

        List<FlowRun> list = wfeFlowRunMapper.getRecentWorkFlow(map);

        for (FlowRun flowRun : list){


        }

return null;

    }

    public String getRecentWorkFlowString(FlowRun flowRun){

        switch (flowRun.getFlowId()){
            case 140:

                break;





        }
        return null;
    }


}
